﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GiMessCommons
{
    public enum NetServices
    {
        Blank           = 0,
        Auth            = 1,
        LoginAccepted   = 2,
        LoginFailed     = 3,
        SendMessage     = 4,
        TypeNotify      = 5,
        ListRequest     = 6,
        ListSend        = 7,
        CreateAccount   = 8,
        CreateAccFaied  = 9,
        CreateAccSucces = 10,
        UpdateStatus    = 11,
        UpdateOnline    = 12,
        SignOut         = 13,
    }

    public static class NetConsants
    {
        private const string fieldsDelim        = "ÀÛ";//"À€";
        private const string fieldsDelimReplace = "&#192;&#219";//"&#192;&#8364;";
        private const string packetHeader       = "GMSG";
        private const int    port               =  1300;
        private const string ip                 = "127.0.0.1";

        //private static string fieldsDelim     = Encoding.UTF8.GetString(new byte[] {192, 219});

        //private static string stringEncoder = "ASCII";

        public static string PacketHeader
        {
            get { return packetHeader; }
        }

        public static string FieldsDelimiter
        {
            get { return fieldsDelim; }
        }

        public static string FieldsDelimiterReplace
        {
            get { return fieldsDelimReplace; }
        }

        public static int ConnectionPort
        {
            get { return port; }
        }

        public static string ConnectionIP
        {
            get { return ip; }
        }

        //public static string StringEncoder
        //{
        //    get { return stringEncoder; }
        //}
    }

}
